/* 全局样式 */
* {
    color: #333333;
    background-color: #FFFFFF;
    selection-background-color: #0078D7;
    selection-color: #FFFFFF;
    alternate-background-color: #F5F5F5;
    outline: none;
    border: none;
    border-radius: 4px;
}

/* QAction */
QAction {
    color: #333333;
    background-color: transparent;
    border: none;
    padding: 5px 10px;
}

QAction:hover {
    background-color: #E5E5E5;
}

QAction:checked {
    color: #0078D7;
    background-color: #E5F3FF;
}

/* QWidget */
QWidget {
    color: #333333;
    background-color: #FFFFFF;
}

/* QGroupBox */
QGroupBox {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    margin-top: 10px;
    padding-top: 15px;
}

QGroupBox::title {
    subcontrol-origin: margin;
    subcontrol-position: top left;
    left: 10px;
    padding: 0 5px 0 5px;
}

/* 布局管理器 */
QHBoxLayout, QVBoxLayout {
    spacing: 6px;
}

/* QPushButton */
QPushButton {
    color: #FFFFFF;
    background-color: #0078D7;
    border: none;
    padding: 5px 15px;
    min-width: 80px;
}

QPushButton:hover {
    background-color: #1884D7;
}

QPushButton:pressed {
    background-color: #006CBE;
}

QPushButton:flat {
    background-color: transparent;
    border: 1px solid #CCCCCC;
}

QPushButton:flat:hover {
    background-color: #E5E5E5;
}

/* QToolButton */
QToolButton {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
}

QToolButton:hover {
    background-color: #E5E5E5;
}

QToolButton:pressed {
    background-color: #D5D5D5;
}

/* QRadioButton */
QRadioButton {
    color: #333333;
    spacing: 8px;
}

QRadioButton::indicator {
    width: 18px;
    height: 18px;
    border: 2px solid #CCCCCC;
    border-radius: 9px;
    background-color: #FFFFFF;
}

QRadioButton::indicator:hover {
    border-color: #0078D7;
}

QRadioButton::indicator:checked {
    border-color: #0078D7;
    background-color: #FFFFFF;
}

QRadioButton::indicator:checked::after {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: #0078D7;
    position: absolute;
    top: 4px;
    left: 4px;
}

/* QCheckBox */
QCheckBox {
    color: #333333;
    spacing: 8px;
}

QCheckBox::indicator {
    width: 18px;
    height: 18px;
    border: 2px solid #CCCCCC;
    border-radius: 3px;
    background-color: #FFFFFF;
}

QCheckBox::indicator:hover {
    border-color: #0078D7;
}

QCheckBox::indicator:checked {
    border-color: #0078D7;
    background-color: #FFFFFF;
}

QCheckBox::indicator:checked::after {
    width: 10px;
    height: 6px;
    border-left: 2px solid #0078D7;
    border-bottom: 2px solid #0078D7;
    position: absolute;
    top: 5px;
    left: 3px;
}

/* QCommandLinkButton */
QCommandLinkButton {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 8px;
}

QCommandLinkButton:hover {
    background-color: #E5E5E5;
}

QCommandLinkButton:pressed {
    background-color: #D5D5D5;
}

/* QDialogButtonBox */
QDialogButtonBox {
    color: #333333;
    background-color: #FFFFFF;
    border: none;
}

QDialogButtonBox QPushButton {
    min-width: 80px;
}

/* QListView, QTreeView, QTableView */
QListView, QTreeView, QTableView {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    gridline-color: #E5E5E5;
    alternate-background-color: #F5F5F5;
}

QListView::item, QTreeView::item, QTableView::item {
    color: #333333;
    background-color: #FFFFFF;
    border: none;
    padding: 3px;
}

QListView::item:hover, QTreeView::item:hover, QTableView::item:hover {
    background-color: #E5E5E5;
}

QListView::item:selected, QTreeView::item:selected, QTableView::item:selected {
    color: #FFFFFF;
    background-color: #0078D7;
}

/* QUndoView */
QUndoView {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

/* QColumnView */
QColumnView {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

/* QMdiArea */
QMdiArea {
    color: #333333;
    background-color: #F0F0F0;
}

QMdiArea::viewport {
    border: 2px solid #CCCCCC;
}

/* QTabWidget */
QTabWidget::pane {
    border: 1px solid #CCCCCC;
    background-color: #FFFFFF;
}

QTabWidget::tab-bar {
    left: 5px;
}

QTabBar::tab {
    color: #333333;
    background-color: #F0F0F0;
    border: 1px solid #CCCCCC;
    padding: 5px 15px;
    margin-right: 2px;
}

QTabBar::tab:selected {
    color: #0078D7;
    background-color: #FFFFFF;
}

QTabBar::tab:hover {
    background-color: #E5E5E5;
}

/* QStackedWidget */
QStackedWidget {
    color: #333333;
    background-color: #FFFFFF;
}

/* QFrame */
QFrame {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

QFrame[frameShape="0"] {
    border: none;
}

/* 水平线 */
QFrame[frameShape="HLine"], QFrame[frameShape="4"] {
    color: #CCCCCC;
    background-color: #CCCCCC;
    height: 2px;
    margin: 5px 0;
}

/* 垂直线 */
QFrame[frameShape="VLine"], QFrame[frameShape="2"] {
    color: #CCCCCC;
    background-color: #CCCCCC;
    width: 2px;
    margin: 0 5px;
}

/* QScrollArea */
QScrollArea {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

QScrollArea > QWidget > QWidget {
    background-color: #FFFFFF;
}

/* QToolBox */
QToolBox::tab {
    color: #333333;
    background-color: #F0F0F0;
    border: 1px solid #CCCCCC;
    padding: 5px 15px;
}

QToolBox::tab:selected {
    color: #0078D7;
    background-color: #FFFFFF;
}

QToolBox::tab:hover {
    background-color: #E5E5E5;
}

/* QComboBox */
QComboBox {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px 15px;
    min-width: 6em;
}

QComboBox:hover {
    border-color: #0078D7;
}

QComboBox::drop-down {
    border: none;
    width: 20px;
}

QComboBox::down-arrow {
    image: url(down_arrow.png);
    width: 12px;
    height: 12px;
}

QComboBox QAbstractItemView {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    selection-background-color: #0078D7;
    selection-color: #FFFFFF;
}

/* QFontComboBox */
QFontComboBox {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px 15px;
}

QFontComboBox:hover {
    border-color: #0078D7;
}

/* QLineEdit */
QLineEdit {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
}

QLineEdit:hover {
    border-color: #0078D7;
}

QLineEdit:focus {
    border-color: #0078D7;
}

/* QTextEdit, QPlainTextEdit */
QTextEdit, QPlainTextEdit {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
}

QTextEdit:hover, QPlainTextEdit:hover {
    border-color: #0078D7;
}

QTextEdit:focus, QPlainTextEdit:focus {
    border-color: #0078D7;
}

/* QSpinBox, QDoubleSpinBox */
QSpinBox, QDoubleSpinBox {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
    min-width: 60px;
}

QSpinBox:hover, QDoubleSpinBox:hover {
    border-color: #0078D7;
}

QSpinBox::up-button, QDoubleSpinBox::up-button {
    border: none;
    width: 20px;
}

QSpinBox::down-button, QDoubleSpinBox::down-button {
    border: none;
    width: 20px;
}

/* QTimeEdit, QDateEdit */
QTimeEdit, QDateEdit {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
}

QTimeEdit:hover, QDateEdit:hover {
    border-color: #0078D7;
}

/* QDial */
QDial {
    color: #333333;
    background-color: #FFFFFF;
}

QDial::groove {
    border: 1px solid #CCCCCC;
    border-radius: 99px;
}

QDial::handle {
    background-color: #0078D7;
    border: 1px solid #FFFFFF;
    border-radius: 7px;
    width: 14px;
    height: 14px;
}

/* QKeySequenceEdit */
QKeySequenceEdit {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
}

QKeySequenceEdit:hover {
    border-color: #0078D7;
}

/* QLabel */
QLabel {
    color: #333333;
    background-color: transparent;
}

/* QTextBrowser */
QTextBrowser {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    padding: 5px;
}

/* QGraphicsView */
QGraphicsView {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

/* QCalendarWidget */
QCalendarWidget {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

QCalendarWidget QWidget {
    color: #333333;
    background-color: #FFFFFF;
}

QCalendarWidget QAbstractItemView:enabled {
    color: #333333;
    background-color: #FFFFFF;
    selection-background-color: #0078D7;
    selection-color: #FFFFFF;
}

QCalendarWidget QAbstractItemView:disabled {
    color: #999999;
}

QCalendarWidget QSpinBox {
    border: none;
    background-color: transparent;
}

QCalendarWidget QToolButton {
    color: #333333;
    background-color: transparent;
    border: none;
}

QCalendarWidget QToolButton:hover {
    color: #0078D7;
}

/* QLCDNumber */
QLCDNumber {
    color: #00FF00;
    background-color: #000000;
    border: 1px solid #333333;
}

/* QProgressBar */
QProgressBar {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    text-align: center;
}

QProgressBar::chunk {
    background-color: #0078D7;
}

/* QOpenGLWidget */
QOpenGLWidget {
    color: #333333;
    background-color: #FFFFFF;
}

/* QMenuBar */
QMenuBar {
    color: #333333;
    background-color: #FFFFFF;
    border-bottom: 1px solid #CCCCCC;
}

QMenuBar::item {
    color: #333333;
    background-color: transparent;
    padding: 5px 10px;
}

QMenuBar::item:selected {
    color: #FFFFFF;
    background-color: #0078D7;
}

QMenuBar::item:hover {
    background-color: #E5E5E5;
}

/* QMenu */
QMenu {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

QMenu::item {
    color: #333333;
    background-color: transparent;
    padding: 5px 25px;
}

QMenu::item:selected {
    color: #FFFFFF;
    background-color: #0078D7;
}

QMenu::separator {
    height: 1px;
    background-color: #CCCCCC;
    margin: 5px 0;
}

QMenu::indicator {
    width: 18px;
    height: 18px;
    border: 2px solid #CCCCCC;
    border-radius: 3px;
    background-color: #FFFFFF;
}

QMenu::indicator:hover {
    border-color: #0078D7;
}

QMenu::indicator:checked {
    border-color: #0078D7;
    background-color: #FFFFFF;
}

QMenu::indicator:checked::after {
    width: 10px;
    height: 6px;
    border-left: 2px solid #0078D7;
    border-bottom: 2px solid #0078D7;
    position: absolute;
    top: 5px;
    left: 3px;
}

/* QStatusBar */
QStatusBar {
    color: #333333;
    background-color: #FFFFFF;
    border-top: 1px solid #CCCCCC;
}

/* QDockWidget */
QDockWidget {
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
}

QDockWidget::title {
    color: #333333;
    background-color: #F0F0F0;
    padding: 5px;
}

QDockWidget::close-button, QDockWidget::float-button {
    border: none;
}

/* 滚动条 */
QScrollBar:horizontal {
    height: 15px;
    background-color: #F0F0F0;
    margin: 0px 15px 0px 15px;
    border: none;
}

QScrollBar::handle:horizontal {
    background-color: #CCCCCC;
    min-width: 20px;
    border-radius: 7px;
}

QScrollBar::handle:horizontal:hover {
    background-color: #0078D7;
}

QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
    width: 15px;
    background-color: #F0F0F0;
    border: none;
}

QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
    background: none;
}

QScrollBar:vertical {
    width: 15px;
    background-color: #F0F0F0;
    margin: 15px 0px 15px 0px;
    border: none;
}

QScrollBar::handle:vertical {
    background-color: #CCCCCC;
    min-height: 20px;
    border-radius: 7px;
}

QScrollBar::handle:vertical:hover {
    background-color: #0078D7;
}

QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
    height: 15px;
    background-color: #F0F0F0;
    border: none;
}

QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
    background: none;
}

/* 滑块 */
QSlider::groove:horizontal {
    height: 6px;
    background: #CCCCCC;
    border-radius: 3px;
    margin: 2px 0;
}

QSlider::handle:horizontal {
    background: #0078D7;
    border: 1px solid #FFFFFF;
    width: 18px;
    height: 18px;
    margin: -6px 0;
    border-radius: 9px;
}

QSlider::groove:vertical {
    width: 6px;
    background: #CCCCCC;
    border-radius: 3px;
    margin: 0 2px;
}

QSlider::handle:vertical {
    background: #0078D7;
    border: 1px solid #FFFFFF;
    width: 18px;
    height: 18px;
    margin: 0 -6px;
    border-radius: 9px;
}
